Skip to content

fix(windows): close skill-markdown graph clients to avoid sqlite EBUSY - #58

Merged
Roarpeng merged 2 commits into
mainfrom
cursor/close-skill-markdown-clients-d8ac
Oct 7, 2026
Merged

Roarpeng merged 2 commits into
mainfrom
cursor/close-skill-markdown-clients-d8ac

Conversation

@Roarpeng

@Roarpeng Roarpeng commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Why

validate-platforms (windows-latest) failed in skill-markdown tests with:

EBUSY: resource busy or locked, unlink
...\graphflow-out\graphflow-graph.sqlite

Default graphPolicy.transport is auto (sqlite when better-sqlite3 is present). importSkillsFromMarkdownRuntime, exportSkillsToMarkdownRuntime, and extractDialogueKnowledgeRuntime opened a graph client and never close()'d it. On Windows that lock blocks rmSync of the temp workspace.

Changes

  • Those three runtimes await client.close() in finally, including when a later write throws.
  • A missing import path still fails before a client is opened.
  • New test records that close() ran. Existing progressive/interop suites still pass.

Validation

npx vitest run tests/skill-markdown-client-close.test.ts tests/skill-markdown-progressive.test.ts tests/skill-markdown-interop.test.ts — 19 passed (Linux).

Windows file locks are not reproducible on this Linux agent. The fix is the same handle release the sqlite client already uses elsewhere (close() calls better-sqlite3's db.close()). The new test asserts the runtime invokes close() before returning, which is what lets Windows unlink graphflow-graph.sqlite. CI job validate-platforms (windows-latest) is the platform check.

Fixes #53

Open in Web Open in Cursor 

Import, export, and dialogue-knowledge extract opened a graph client and
returned without close(). On Windows the default sqlite transport then
left graphflow-graph.sqlite locked, so cleanup failed with EBUSY.

Fixes #53
@Roarpeng
Roarpeng marked this pull request as ready for review October 7, 2026 09:42
… fix

CHANGELOG conflicted after #57. Both Unreleased notes stay: the MCP SDK
and proxy-addr override, and closing skill-markdown graph clients.

Co-authored-by: RoarPeng <Roarpeng@users.noreply.github.com>
@Roarpeng
Roarpeng merged commit 7ce1ea7 into main Oct 7, 2026
8 checks passed
cursor Bot pushed a commit that referenced this pull request Oct 7, 2026
… fix

CHANGELOG conflicted after #58. Both Unreleased notes stay.
@Roarpeng
Roarpeng deleted the cursor/close-skill-markdown-clients-d8ac branch October 8, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants